﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;

namespace DSSDataServiceGenerator.Controls
{
    public partial class ModelDesigner
    {
        public ModelDesigner()
            : base()
        {
            InitializeComponent();
        }

        protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
        {
            this.InvalidateArrange();

            base.OnItemsSourceChanged(oldValue, newValue);
        }

        protected ModelDesignerCanvasPanel Surface
        {
            get
            {
                return (ModelDesignerCanvasPanel)this.ItemsPanel.FindName("ItemsHost", this);
            }
        }

        protected override DependencyObject GetContainerForItemOverride()
        {
            return new ModelDesignerItem();
        }

        protected IEnumerable<UIElement> InternalItems { get; private set; }
    }
}
